package com.study.mvc.controller;

import com.study.mvc.entity.Student;
import com.study.mvc.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author wei.zhao
 * @date 2021年11月29日 17:08
 */
@Controller
@RequestMapping("student")
public class StudentController {

    @Autowired
    StudentService studentService;

    @ResponseBody
    @GetMapping("/queryAll")
    public List<Student> queryAll() {
        return studentService.queryAll();
    }

}
